package ribbon;


import com.initialize.service.system.config.NacosSameClusterWeightedRule;
import com.netflix.loadbalancer.IRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 * Created with IntelliJ IDEA.
 * User: jane
 * Date: 2019/12/26
 * Time: 3:37 下午
 * Description:
 */
@Configuration
public class RibbonConfiguration {
    @Bean
    public IRule ribbonRule(){
        //返回随机的负载均衡算法
        return new NacosSameClusterWeightedRule();
    }
}